package com.fourforfo.fourmall.ware.dao;

import com.fourforfo.common.constant.WareConstant;
import com.fourforfo.fourmall.ware.entity.PurchaseDetailEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 
 * 
 * @author fourforfo
 * @email fourforfo@gmail.com
 * @date 2022-06-16 12:41:34
 */
@Mapper
public interface PurchaseDetailDao extends BaseMapper<PurchaseDetailEntity> {

    /**
     * 更新所有purchaseDetail的purchaseId和status
     * @param purchaseId
     * @param purchaseDetailIds
     */
    void updatePurchaseDetail(@Param("purchaseId") Long purchaseId, @Param("purchaseDetailIds") List<Long> purchaseDetailIds, @Param("status") Integer status);

    /**
     * 改变采购需求的状态
     * @param purchaseIds
     * @param status
     */
    void updateStatus(@Param("purchaseIds") List<Long> purchaseIds, @Param("status") Integer status);
}
